# vec = [2, 4, 6]
# a = [3*x for x in vec]
# print(a)
# b = [[x, x**2] for x in vec]
# print(b)
# freshfruit = ['  banana', '  loganberry ', 'passion fruit  ']
# # 方法是删除空格，可以替换为其他字符
# c = [weapon.strip() for weapon in freshfruit]
#
# print(c)
# e = [3*x for x in vec if x > 3]
# print(e)
# f = [3*x for x in vec if x <= 3]
# print(f)
#
# vec1 = [2, 4, 6]
# vec2 = [4, 3, -9]
# print([x*y for x in vec1 for y in vec2])
# print([x+y for x in vec1 for y in vec2])
# print([vec1[i]*vec2[i] for i in range(len(vec1))])
#
# list1 = [str(round(355/113, i)) for i in range(1, 6)]
# # 四舍六入，用i决定位数
# print(list1)

